<extend name="Layout/application"/>

<block name="content">
    <div class="row">
        <div class="col-md-12">

            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h1>系统首页</h1>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">系统信息</div>

                        <div class="panel-body">
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs" role="tablist">
                                <li role="presentation" class="active"><a href="#home" role="tab" data-toggle="tab">添加栏目</a></li>
                                <li role="presentation"><a href="#profile" role="tab" data-toggle="tab">栏目内容</a></li>
                            </ul>

                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div role="tabpanel" class="tab-pane active" id="home">
                                    <div class="bs-example">
                                        <table class="table">
                                            <form action="do_add" method="post" class="form">
                                                <tr>
                                                    <td>父栏目</td>
                                                    <td>
                                                        <select id="w" name="parent_id">
                                                            <option value="">请选择添加的栏目</option>
                                                            <volist name="categories" id="c">
                                                                <option value="{{$c.id}}">{{$c.name}}</option>
                                                             <volist name="c.children" id="a">
                                                                 <option value="{{$a.id}}">&nbsp;&nbsp;{{$a.name}}</option>
                                                             </volist>
                                                            </volist>



                                                        </select>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>名称</td>
                                                    <td>
                                                        <input name="name" type="text" placeholder="">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>拼音</td>
                                                    <td>
                                                        <input name="pinyin" type="text" placeholder="">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>类型</td>
                                                    <td>
                                                        <div class="radio1">
                                                            <label>
                                                                <input type="radio" name="type" id=""
                                                                       value="1" checked>
                                                                封面
                                                            </label>
                                                        </div>
                                                        <div class="radio1">
                                                            <label>
                                                                <input type="radio" name="type" id="optionsRadios2"
                                                                       value="2">
                                                                列表
                                                            </label>
                                                        </div>
                                                        <div class="radio1">
                                                            <label>
                                                                <input type="radio" name="type" id="optionsRadios2"
                                                                       value="3">
                                                                URL跳转
                                                            </label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>URL跳转地址</td>
                                                    <td>
                                                        <input id="url" name="url" type="text"
                                                               placeholder="" >
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        是否显示
                                                    </td>
                                                    <td>
                                                        <div class="radio2">
                                                            <label>
                                                                <input type="radio" name="is_show" id="optionsRadios2"
                                                                       value="1" checked>
                                                                是
                                                            </label>
                                                        </div>
                                                        <div class="radio2">
                                                            <label>
                                                                <input type="radio" name="is_show" id="optionsRadios2"
                                                                       value="0">
                                                                否
                                                            </label>
                                                        </div>
                                                    </td>
                                                </tr>






                                        </table>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane" id="profile" ><textarea name="content" rows="15" class="form-control content"></textarea></div>
                                <tr>
                                    <td>
                                        <button type="submit" class="btn btn-success">添加</button>
                                        <a href="" class="btn btn-info">返回</a>
                                    </td>

                                </tr>
                            </div>
                            </form>

                        </div>
                    </div>
                </div>



            </div>
        </div>
    </div>
</block>
<block name="js">
    <script src="__PUBLIC__/ckeditor/ckeditor.js"></script>
    <!--<script type="text/javascript" src="__PUBLIC__/ckfinder/ckfinder.js"></script>-->

    <script>
        CKEDITOR.replace('content',
                {
                    filebrowserBrowseUrl: '__PUBLIC__/ckfinder/ckfinder.html',
                    filebrowserImageBrowseUrl: '__PUBLIC__/ckfinder/ckfinder.html?type=Images',
                    filebrowserFlashBrowseUrl: '__PUBLIC__/ckfinder/ckfinder.html?type=Flash',
                    filebrowserUploadUrl: '__PUBLIC__/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                    filebrowserImageUploadUrl: '__PUBLIC__/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                    filebrowserFlashUploadUrl: '__PUBLIC__/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                });




    </script>

</block>